<template>
  <div class="test-page">
    <delay :timeout="3">测试延时加载, 3秒....</delay>
    <async-demo style="color: blue" />
    <async-demo-timeout />
    <div class="timer">
      <timer :time="'2021-09-12 17:17:32'" :duration="3600 * 24" :show-millisecond="true" :over-text="'再见'" @over="over" />
    </div>
  </div>
</template>

<script>
import Delay from '@/components/Delay'
import Timer from '@/components/Timer'
export default {
  name: 'TestPage',
  components: {
    Timer,
    Delay,
    'async-demo': resolve => {
      require(['@/components/Dynamic'], resolve)
    },
    'async-demo-timeout': resolve => {
      setTimeout(() => {
        require(['@/components/Dynamic'], resolve)
      }, 5000)
    }
  },
  methods: {
    over() {
      console.log('over')
    }
  }
}
</script>

<style scoped>

</style>
